import { NgModule, ModuleWithProviders, Inject } from "@angular/core";
import { CommonModule } from "@angular/common";
import { LoginComponent } from "@/user/cpt/login/login.component";
import { EnrollComponent } from "@/user/cpt/enroll/enroll.component";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { DirectivesModule } from "@/directives/directives.module";

import {
  MatInputModule,
  MatPaginatorModule,
  MatProgressSpinnerModule,
  MatSortModule,
  MatTableModule,
  MatIconModule,
  MatButtonModule,
  MatCardModule,
  MatToolbarModule,
  MatFormFieldModule,
  MatProgressBarModule,
  MatSliderModule,
  MatSlideToggleModule,
  MatCheckboxModule
} from "@angular/material";

import { isPlatformBrowser, isPlatformServer } from "@angular/common";

import { RouterModule, Routes } from "@angular/router";
import { UserHeaderComponent } from "@/user-header/user-header.component";
import { BComponent } from "@/layout/b/b.component";
import { LayoutModule } from "@/layout/layout.module";
import * as fromUser from "@/user/store/reducers";
import { UserEffects } from "@/user/store/effects/user.effects";
import { StoreModule } from "@ngrx/store";
import { EffectsModule } from "@ngrx/effects";

import { CptsModule } from "@/cpts/cpts.module";
import { L10nModule } from "@/l10n/l10n.module";

import { ShareModule } from "@/share/share.module";
import { ForgotComponent } from "./cpt/forgot/forgot.component";
import { Forgot2Component } from "./cpt/forgot2/forgot2.component";
import { MyComponent } from "./cpt/my/my.component";

import { AuthGuardService } from "@/share/services/auth-guard.service";
import { RoleGuardService } from "@/share/services/role-guard.service";

import { UserRoutingModule } from "./user-routing.module";

@NgModule({
  imports: [
    CommonModule,
    LayoutModule,
    L10nModule,
    MatInputModule,
    MatPaginatorModule,
    MatProgressSpinnerModule,
    MatSortModule,
    MatTableModule,
    MatIconModule,
    MatButtonModule,
    MatCardModule,
    MatToolbarModule,
    MatFormFieldModule,
    MatProgressBarModule,
    MatCheckboxModule,
    FormsModule,
    ReactiveFormsModule,
    ShareModule,
    UserRoutingModule,
    // FileModule,
    // ExcelModule,
    // SelectAreaModule,
    // SelectPosModule,
    // SelectGoodTypeModule,
    MatSliderModule,
    MatSlideToggleModule,
    // StoreModule.forFeature("user", fromUser.reducers),
    // EffectsModule.forFeature([UserEffects]),
    DirectivesModule,
    CptsModule
  ],
  declarations: [
    LoginComponent,
    EnrollComponent,
    ForgotComponent,
    Forgot2Component,
    MyComponent
  ],
  exports: [LoginComponent, EnrollComponent]
})
export class UserModule {}
